#include<iostream>
#include<unistd.h>
using namespace std;
int main(){
	int i = 0;
	while(true){
		cout << "while " << ++i << endl;
		sleep(1);
		if(i == 5){
		cout << "alarm 5 begin" << endl;
			alarm(5);
		}
	}
	return 0; 
}
